package com.zero.manage.web.components.controller;

import com.zero.manage.web.components.entity.SysLogEntity;
import com.zero.manage.web.components.query.SysLogQuery;
import com.zero.manage.web.components.service.SysLogService;
import io.gitee.zerowsh.util.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sysLog")
@Api(tags = "系统日志")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    @PostMapping("/pageList")
    @ApiOperation(value = "分页列表", notes = "获取日志分页列表")
    public PageResult<List<SysLogEntity>> pageList(@RequestBody SysLogQuery query) {
        return sysLogService.pageList(query);
    }

}
